Imports Ioc

Public Class TestInter
    Implements ITestInter

    Private m_Text As String

    Public Shared Property Hits As Integer

    Public Sub EmptyMethod() Implements ITestInter.EmptyMethod
        m_Text = "EmptyMethod"
        Hits += 1
    End Sub

    Public Sub EmptyMethodWithParam(text As String) Implements ITestInter.EmptyMethodWithParam
        m_Text = text
        Hits += 1
    End Sub

    Public Property Prop As String Implements ITestInter.Prop
        Get
            Hits += 1
            Threading.Thread.Sleep(1000)
            Return m_Text
        End Get
        Set(ByVal value As String)
            m_Text = value
            Hits += 1
        End Set
    End Property

    Public ReadOnly Property ReadOnlyProp As String Implements ITestInter.ReadOnlyProp
        Get
            Hits += 1
            Return m_Text
        End Get
    End Property
    <Ioc.Attributes.DoNotCacheMethod>
    Public Function TesterNameChange() As String Implements ITestInter.Tester
        Hits += 1
        Return m_Text
    End Function

    Public Function TesterText(text As String) As String Implements ITestInter.TesterText
        Hits += 1
        m_Text = text
        Return m_Text
    End Function

    Public WriteOnly Property WriteOnlyProp As String Implements ITestInter.WriteOnlyProp
        Set(value As String)
            m_Text = value
        End Set
    End Property

    Public Property PropWithParam(text As String) As String Implements ITestInter.PropWithParam
        Get
            Hits += 1
            Return m_Text
        End Get
        Set(value As String)
            Hits += 1
            m_Text = text & value
        End Set
    End Property

    Public ReadOnly Property ReadOnlyPropWithParam(text As String) As String Implements ITestInter.ReadOnlyPropWithParam
        Get
            Hits += 1
            Return text
        End Get
    End Property

    Public WriteOnly Property WriteOnlyPropWithParam(text As String) As String Implements ITestInter.WriteOnlyPropWithParam
        Set(value As String)
            Hits += 1
            m_Text = text & value
        End Set
    End Property
End Class